home *** CD-ROM | disk | FTP | other *** search
- .cm CAT:CMS
- .cm NAM:FLOW
- .cm EXP: Fortran Code Structure Analyser
- .cm DAT: 92.15.07
- .cm A/R: J.J.Bunn
- .cm KEY: FLOPPY FORTRAN STRUCTURE CHART STRUCTURE_CHART
- .cm KEY: SC SASD FLOP CODE
- .cm ABS: A program which allows the user to plot the subroutine
- .cm ABS: calling tree of a Fortran program passed through FLOPPY.
- .cm ABS: The calling tree may also be explored interactively.
- .cm ABS: Other options include the production of a table
- .cm ABS: of COMMON block names and the routines in which
- .cm ABS: each is used.
- .cm FLG: LOCAL
- .cm END:
-
-
- FLOW (Structure Analysers)
-
- Users are referred to the FLOPPY writeup (DD/US/112) available in the UCO
- for full details of the use of FLOW.
-
- FLOW is used to produce subroutine calling trees, COMMON block usage
- tables, and to interactively explore subroutine calling trees.
- It is used after a FORTRAN program has been passed through FLOPPY.
- Various options are available, including suppression of external
- module names from the produced tree, and specification of the top
- node module name.
- Graphics output is in the form of a file of PostScript.
- This graphics output is intended to represent the SASD Structure
- Chart corresponding to the source FORTRAN, and, as such, may be used
- as a "backward engineering" tool.
-
- Note: You need at least a 12 M machine to run FLOW.
-
- FLOW is invoked via a panel or from the command line as follows:
-
- +--------+--------------------------------------------------------------+
- | | |
- | FLOW | [ ? | [fn [ft [fm]]] [( Options ]] |
- | | |
- | | Options: |
- | | |
- | | [QUERY] |
- | | [EXTERNALS] |
- | | [STRUCTURE_CHART fn [ft [fm]]] |
- | | [GRAPHICS fn [ft [fm]]] |
- | | [NODE nodename] |
- | | [COMMON_TABLE fn [ft [fm]]] |
- +--------+--------------------------------------------------------------+
-
- where:
-
- When FLOW is entered without any operands or options,
- a panel will be displayed in which details of the FLOW
- job may be entered.
-
- ? If this is the only operand this HELP file will be displayed.
-
- fn ft fm
- Specifies the name of a binary file produced using the
- TREE option in FLOPPY.
-
- QUERY Enter the interactive exploration facility of FLOW !
- You will be shown the full list of module names in the
- source, and can then specify one of them to see which
- modules it calls, and which modules call it. In this
- way you can move freely around the tree.
-
- STRUCTURE_CHART fn ft fm
- Specifies that a text file be written containing the
- calling tree of the source FORTRAN. The tree shows modules
- local to the code and external, and indicates whether they
- appear in IF or DO clauses. Stub modules (no calls), external
- modules (not local), multiply-called modules and sub-trees
- are all clearly indicated. If the FORTRAN source contained
- lines after each module declaration of the form:
- C! This is a short comment
- then these comments are shown against each module name in the
- tree.
-
- GRAPHICS fn ft fm
- Specifies that a graphics metafile (either GKS or PostScript)
- be written, which, when interpreted, will show the SASD-like
- structure chart of the source FORTRAN. It is recommended
- NOT to ask for EXTERNALS with this option. An attempt
- is made to optimize the positions of modules on the page,
- in order to minimise line crossings etc.. But this is often
- unsuccessful!
-
- NODE nodename
- Specifies the top node in either the text or graphics
- structure chart. This is useful for restricting the output
- to a particular sub-tree of interest. The value nodename
- must be a PROGRAM, SUBROUTINE or FUNCTION name in the
- source FORTRAN.
-
- EXTERNALS Specifies that modules external to the source FORTRAN
- (e.g. SIN, COS, UCOPY, HBOOK1 etc.) be shown in the tree.
-
- COMMON_TABLE fn ft fm
- Specifies that a table be written containing, on the y-axis
- the names of all COMMON blocks, and on the x-axis all the
- module names, contained in the source FORTRAN. At each
- place in the table a 'Y' indicates that the COMMON block
- appears in that module, and at least one variable from it
- is used in the module, a 'N' indicates that the COMMON
- block is declared but not used, and a blank indicates that
- the COMMON block is not declared in that module.
-
- Example
- To interactively explore the calling tree of your program
- MCARLO FORTRAN, use the following two commands:
-
- FLOPPY MCARLO (CHECKS NONE TREE DISK
- FLOW MCARLO (QUERY
-